#include <chrono>
#include <ctime>
#include <iomanip>
#include <iostream>

using milliseconds = std::chrono::milliseconds;
using namespace std::chrono;

int main(int argc, char *argv[]) {
  // Timestamp
  {
    auto now = system_clock::now();
    auto t = now.time_since_epoch();
    std::cout << duration_cast<milliseconds>(t).count() << "\n";
  }
  // To time_point
  {
    using namespace std::literals;
    auto s = 1602207217323ms;
    system_clock::time_point tp(s);
    std::time_t t = system_clock::to_time_t(tp);
    std::cout << std::put_time(std::gmtime(&t), "%FT%TZ") << "\n";
  }

  // Profiling chrono::duration_cast<milliseconds>(d).count()

  // Literals

  // Format Time time_t std::put_time putenv(tz.data())

  return 0;
}
